home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / var / lib / dpkg / info / ttf-sazanami-mincho.prerm < prev    next >
Encoding:
Text File  |  2008-12-15  |  1.7 KB  |  73 lines

  1. #! /bin/sh
  2. # prerm script for ttf-sazanami-gothic
  3. #
  4. # see: dh_installdeb(1)
  5.  
  6. set -e
  7.  
  8. ALT_NAME="ttf-japanese-mincho"
  9. FONT_ENTRY="/usr/share/fonts/truetype/sazanami/sazanami-mincho.ttf"
  10.  
  11. # update font cache
  12. fontconfig_cache_update()
  13. {
  14.         if [ -x /usr/bin/fc-cache ]; then
  15.           fc-cache update
  16.         fi
  17. }
  18.  
  19. # summary of how this script can be called:
  20. #        * <prerm> `remove'
  21. #        * <old-prerm> `upgrade' <new-version>
  22. #        * <new-prerm> `failed-upgrade' <old-version>
  23. #        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
  24. #        * <deconfigured's-prerm> `deconfigure' `in-favour'
  25. #          <package-being-installed> <version> `removing'
  26. #          <conflicting-package> <version>
  27. # for details, see http://www.debian.org/doc/debian-policy/ or
  28. # the debian-policy package
  29.  
  30.  
  31. case "$1" in
  32.     upgrade|deconfigure)
  33.         fontconfig_cache_update
  34.         ;;
  35.     remove) 
  36.         # remove old ttf-japanese-gothic alternatives
  37.         update-alternatives --remove $ALT_NAME $FONT_ENTRY
  38.  
  39.         # * remove not ".ttf" postfix file
  40.         if [ -f /usr/share/fonts/truetype/$ALT_NAME ]; then
  41.           rm /usr/share/fonts/truetype/$ALT_NAME
  42.         fi
  43.  
  44.         # alternative
  45.         update-alternatives --remove $ALT_NAME.ttf $FONT_ENTRY
  46.  
  47.         fontconfig_cache_update
  48.         ;;
  49.     failed-upgrade)
  50.         ;;
  51.     *)
  52.         echo "prerm called with unknown argument \`$1'" >&2
  53.         exit 1
  54.     ;;
  55. esac
  56.  
  57. # dh_installdeb will replace this with shell code automatically
  58. # generated by other debhelper scripts.
  59.  
  60. # Automatically added by dh_installdefoma
  61. FILE='/etc/defoma/hints/ttf-sazanami-mincho.hints'
  62. if [ "$1" = remove ]; then
  63.     test -x /usr/bin/defoma-font && /usr/bin/defoma-font purge-all $FILE
  64. fi
  65. # End automatically added section
  66.  
  67.  
  68. exit 0
  69.  
  70.  
  71.  
  72.  
  73.